package com.one.group.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 车辆-车位绑定及授权实体类
 */
@Data
@Table("sp_vehicle_space")
public class VehicleSpace implements Serializable {

    /**
     * 绑定ID
     */
    @Id(keyType = KeyType.Auto)
    @Column("id")
    private Long id;

    /**
     * 小区ID
     */
    @Column("cell_id")
    private Long cellId;

    /**
     * 车辆ID
     */
    @Column("vehicle_id")
    private Long vehicleId;

    /**
     * 车位ID
     */
    @Column("parking_space_id")
    private Long parkingSpaceId;

    /**
     * 绑定类型:1.长期、2.临时
     */
    @Column("bind_type")
    private Integer bindType;

    /**
     * 授权开始时间
     */
    @Column("authorize_start")
    private Date authorizeStart;

    /**
     * 授权结束时间
     */
    @Column("authorize_end")
    private Date authorizeEnd;

    /**
     * 授权状态:1.有效、2.已到期、3.已解除
     */
    private Integer status;

    /**
     * 经办人姓名(可对接系统用户表)
     */
    @Column("created_by")
    private String createdBy;

    /**
     * 创建时间
     */
    @Column("created_time")
    private Date createdTime;

    /**
     * 更新时间
     */
    @Column("updated_time")
    private Date updatedTime;

    /**
     * 租户id
     */
    @Column(value = "tenant_id", tenantId = true)
    private Long tenantId;
}

